#ifndef GLAD_H
#define GLAD_H

#include <cassert>  //used in change ChangeState()
#include <iomanip>	//used for formatting
#include <fstream>  //used for file i/o
#include <iostream> //used for cin/cout
using namespace std;

#include "BaseGameEntity.h"
#include "Locations.h"
#include "Inventory.h"

class State;

const int MAX_LEVEL = 20;
const int MAX_HP = 250;

class Gladiator : public BaseGameEntity
{
private:
	//stores the current state of the entity
	State*			m_pCurrentState;

	//stores the current location of the entity
	location_type         m_Location;

	int				level;
	int				MaxHP;
	int				CurrentHP;
	int				EXP;
	int				Attack;
	int				MaxDefense;			//gladiators actual defense
	int				CurrentDefense;		//used for defense buffer
	int				Money;

public:
	Inventory		pack;				//stores gladiators items
	
public:
	Gladiator(int id);

	//must be implemented
	int Update();

	//this method changes the current state to the new state.  It first calls
	//the Exit() method of the current state, then assigns the new state to 
	//m_pCurrentState and finally calls the Enter() method of the new state
	void ChangeState(State* new_state);

	//return and change location_type
	location_type Location()const{return m_Location;}
	void          ChangeLocation(location_type loc){m_Location=loc;}

	void	setData(int, int, int, int, int, int, int);

	void	displayStatus();

	bool	levelUp();

	bool	loadSaveData();
	void	SaveData();

	bool	purchase(int);

	void	sleep();

	void	healthBoost(int);

	void	defenseCheck();
	void	hangover(int);
	bool	gotDefBoost();

	void	weaponBoost(int);
	void	armorBoost(int);
	void	removeWeapon(int);
	void	removeArmor(int);

	void	sell(int);

	bool    ReceiveDamage(int);
	int		AttackDamage();
	void	Taunt();
	void	DeathCry();
	bool	OnDefend(int);

	void	printHP();
	void	victory(int, int);

	int		getLevel() {return level;}
	int		getMaxHP() {return MaxHP;}

};

#endif